package com.hengpeng.itfinbase.persist;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 平台垫付追偿表
 * </pre>
 * @author weiyuan
 * @version 1.0, 2015年5月27日
 */
@Entity
public class RecoverRepay extends AbstractAssign18IdEntity implements Cloneable, Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5874611511074460341L;

	/**
	 * 还款计划编号
	 */
	@HtmlInput(index = 1, type = HtmlInputType.TEXT, label = "还款计划编号", nullable = false)
	private Long repaymentPlanId;

	/**
	 * 借款信息id
	 */
	@HtmlInput(index = 2, type = HtmlInputType.TEXT, label = "借款信息编号", nullable = false)
	private Long borrowInfoId;

	/**
	 * 标的名称
	 */
	@HtmlInput(index = 3, type = HtmlInputType.TEXT, label = "标的名称", nullable = false)
	private String borrowName;

	/**
	 * 借款人用户名
	 */
	@HtmlInput(index = 7, type = HtmlInputType.TEXT, label = "借款人用户名", nullable = false)
	private String borrowUserName;

	/**
	 * 借款人id
	 */
	@HtmlInput(index = 18, type = HtmlInputType.TEXT, label = "借款人id", nullable = false)
	private Long borrowUserId;

	/**
	 * 总还款期数
	 */
	@HtmlInput(index = 8, type = HtmlInputType.TEXT, label = "总还款期数", nullable = false)
	private Integer totalRepayNum;

	/**
	 * 当前期数
	 */
	@HtmlInput(index = 9, type = HtmlInputType.TEXT, label = "当前期数", nullable = false)
	private Integer curRepayNum;

	/**
	 * 截止还款日
	 */
	@HtmlInput(index = 10, type = HtmlInputType.TEXT, label = "截止还款日", nullable = false)
	private Date lastRepayDate;

	/**
	 * 逾期罚息金额
	 */
	@HtmlInput(index = 11, type = HtmlInputType.TEXT, label = "逾期罚息金额(分)", nullable = false)
	private Long overduePenalty;

	/**
	 * 逾期起息日
	 */
	@HtmlInput(index = 12, type = HtmlInputType.TEXT, label = "逾期起息日", nullable = false)
	private Date overdueDate;

	/**
	 * 追偿状态
	 */
	@Enumerated(javax.persistence.EnumType.STRING)
	@HtmlInput(index = 13, type = HtmlInputType.TEXT, label = "追偿状态", nullable = false, labelProperty = "text")
	private RecoverRepayStatus status;

	/**
	 * 追还时间
	 */
	@HtmlInput(index = 14, type = HtmlInputType.TEXT, label = "追还时间", nullable = false)
	private Date repayTime;

	/**
	 * 创建时间
	 */
	@HtmlInput(index = 15, type = HtmlInputType.TEXT, label = "创建时间", nullable = false)
	private Date createTime;

	/**
	 * 最后更新时间
	 */
	@HtmlInput(index = 16, type = HtmlInputType.TEXT, label = "最后更新时间", nullable = false)
	private Date updateTime;

	/**
	 * 担保人垫付总金额
	 */
	@HtmlInput(index = 17, type = HtmlInputType.TEXT, label = "应偿还总金额(分)", nullable = false)
	private Long recoverRepayMoney;

	/**
	 * 担保人垫付本金
	 */
	@HtmlInput(index = 19, type = HtmlInputType.TEXT, label = "应偿还本金(分)", nullable = false)
	private Long recoverRepayBaseMoney;

	/**
	 * 担保人垫付利息
	 */
	@HtmlInput(index = 20, type = HtmlInputType.TEXT, label = "应偿还利息(分)", nullable = false)
	private Long recoverRepayInterestMoney;

	@HtmlInput(index = 15, type = HtmlInputType.TEXT, label = "是否逾期", nullable = false)
	@Enumerated(javax.persistence.EnumType.STRING)
	private BoolValue isOverDured;

	public Long getBorrowInfoId()
	{
		return borrowInfoId;
	}

	public void setBorrowInfoId(Long borrowInfoId)
	{
		this.borrowInfoId = borrowInfoId;
	}

	public String getBorrowName()
	{
		return borrowName;
	}

	public void setBorrowName(String borrowName)
	{
		this.borrowName = borrowName;
	}

	public String getBorrowUserName()
	{
		return borrowUserName;
	}

	public void setBorrowUserName(String borrowUserName)
	{
		this.borrowUserName = borrowUserName;
	}

	public Integer getTotalRepayNum()
	{
		return totalRepayNum;
	}

	public void setTotalRepayNum(Integer totalRepayNum)
	{
		this.totalRepayNum = totalRepayNum;
	}

	public Integer getCurRepayNum()
	{
		return curRepayNum;
	}

	public void setCurRepayNum(Integer curRepayNum)
	{
		this.curRepayNum = curRepayNum;
	}

	public Date getLastRepayDate()
	{
		return lastRepayDate;
	}

	public void setLastRepayDate(Date lastRepayDate)
	{
		this.lastRepayDate = lastRepayDate;
	}

	public Long getOverduePenalty()
	{
		return overduePenalty;
	}

	public void setOverduePenalty(Long overduePenalty)
	{
		this.overduePenalty = overduePenalty;
	}

	public Date getOverdueDate()
	{
		return overdueDate;
	}

	public void setOverdueDate(Date overdueDate)
	{
		this.overdueDate = overdueDate;
	}

	public RecoverRepayStatus getStatus()
	{
		return status;
	}

	public void setStatus(RecoverRepayStatus status)
	{
		this.status = status;
	}

	public BoolValue getIsOverDured()
	{
		return isOverDured;
	}

	public void setIsOverDured(BoolValue isOverDured)
	{
		this.isOverDured = isOverDured;
	}

	public Date getRepayTime()
	{
		return repayTime;
	}

	public void setRepayTime(Date repayTime)
	{
		this.repayTime = repayTime;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Long getRepaymentPlanId()
	{
		return repaymentPlanId;
	}

	public void setRepaymentPlanId(Long repaymentPlanId)
	{
		this.repaymentPlanId = repaymentPlanId;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Long getRecoverRepayMoney()
	{
		return recoverRepayMoney;
	}

	public void setRecoverRepayMoney(Long recoverRepayMoney)
	{
		this.recoverRepayMoney = recoverRepayMoney;
	}

	public Long getBorrowUserId()
	{
		return borrowUserId;
	}

	public void setBorrowUserId(Long borrowUserId)
	{
		this.borrowUserId = borrowUserId;
	}

	public Long getRecoverRepayBaseMoney()
	{
		return recoverRepayBaseMoney;
	}

	public void setRecoverRepayBaseMoney(Long recoverRepayBaseMoney)
	{
		this.recoverRepayBaseMoney = recoverRepayBaseMoney;
	}

	public Long getRecoverRepayInterestMoney()
	{
		return recoverRepayInterestMoney;
	}

	public void setRecoverRepayInterestMoney(Long recoverRepayInterestMoney)
	{
		this.recoverRepayInterestMoney = recoverRepayInterestMoney;
	}

	/**
	 * <pre>
	 * 追偿状态
	 * </pre>
	 * @author chenhui
	 * @version 1.0, 2015-5-15
	 */
	public static enum RecoverRepayStatus
	{
		/**
		 * 未追回
		 */
		UNRECOVER("未追回"),
		/**
		 * 偿还中
		 */
		RECOVERING("偿还中"),
		/**
		 * 已追回
		 */
		RECOVERED("已追回");

		private String text;

		RecoverRepayStatus(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}
	}
}
